<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>求和</title>
</head>
<body>
        <script>
        var i = 0;
        var s =0;
        while (i<=100){
         s = s + i;
            i = i+2         //原本i+1,因为是偶数的和，所以这次要加二
     }

        console.log(s)

        </script>
</body>
</html>